﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace demo
{
    /// <summary>
    /// 此窗体是为了PropertyGrid控件中object的属性输入值所创建
    /// </summary>
    public partial class EditScript : Form
    {
        public EditScript()
        {
            InitializeComponent();
        }
        public static object EditValue(object value)
        {
            EditScript form = new EditScript();
            if (value!=null)
            {
                if (value.ToString() == typeof(object).FullName)
                {
                   
                    return typeof(object).FullName;
                }
                form.textBox1.Text = value.ToString();
            }
            
            
            form.ShowDialog();
            return form.GetValue();
        }
        public string GetValue()
        {
            return textBox1.Text;
        }

    }
}
